export function setting_reducer(preState = {
    username: '张三',
    unReadCount: 0,
}, action) {
    const { type, payload } = action;
    switch (type) {
        case 'changeUserName':
            return { ...preState, username: payload }
        case 'getUnreadCount':
            return { ...preState, unReadCount: payload }
        default:
            return preState
    }
}